<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/canteen_yd.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/canteen_yd.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'canteen_yd_id',
                footer: "Foots",
                cnName: '就餐预约',
                name: 'jrtable/canteen_yd',
                url: "/canteen_yd/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"department":[],"xname":""});
            const searchFormOptions = ref([[{"dataKey":"oa_depname","data":[],"title":"所属部门","field":"department","type":"cascader"},{"title":"姓名","field":"xname","type":"like"}]]);
            const columns = ref([{field:'canteen_yd_id',title:'食堂预定',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'department',title:'所属部门',type:'string',bind:{ key:'oa_depname',data:[]},width:220,require:true,align:'left',sort:true},
                       {field:'xname',title:'姓名',type:'string',link:true,width:220,require:true,align:'left'},
                       {field:'ipaddress',title:'IP地址',type:'string',width:220,align:'left'},
                       {field:'CreateDate',title:'填报时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'zao_c',title:'早餐',type:'int',width:110,require:true,align:'left'},
                       {field:'wu_c',title:'午餐',type:'int',width:110,require:true,align:'left'},
                       {field:'yd_date',title:'预约就餐日期',type:'date',width:150,require:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
